/**
 * 
 */
package com.feonix.designPattern.Iterator.sample;

/**
 * @CopyRight (c)1993-2017
 * @Project common_practice
 * @Comments 请输入该类的描述
 * @NameSpace com.feonix.designPattern.Iterator.sample
 * @Author Feonixzw
 * @CreateDate 2018年1月24日
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BookShelf bookShelf = new BookShelf();
		bookShelf.appendBook(new Book("aaaa"));
		bookShelf.appendBook(new Book("bbbb"));
		bookShelf.appendBook(new Book("cccc"));
		bookShelf.appendBook(new Book("dddd"));
		Iterator it = bookShelf.iterator();
		while(it.hasNext()){
			System.out.println(((Book)it.next()).getName());
		}
		
	}

}
